<%@ page language="java" pageEncoding="utf-8" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>jsp-title</title>
</head>
<body>
<h2>会员管理系统</h2>
<a href="./">首页</a>&nbsp;
<%
    if(session.getAttribute("account") == null){
%>
<a href="login.jsp">登录</a>&nbsp;
<a href="reg.jsp">注册</a>&nbsp;

<%
    }else{
        out.print(String.format("<p>欢迎：%s</p>",session.getAttribute("account").toString()));
        out.print(String.format("<a href=\"%s\">安全退出</a>","/logout"));
    }
%>
<hr>
</body>
</html>
